﻿@using System.Diagnostics.CodeAnalysis
@using Microsoft.FluentUI.AspNetCore.Components
@using Project.Constraints.Store
<FluentNavMenu Collapsible="@true" Expanded="@(!Collapsed)" CollapsedChildNavigation="@true" Style="flex: 1;">
    @foreach (var item in Router.Menus.Where(m => m.Group == "ROOT"))
    {
        <FluentUIMenuItem Route=item></FluentUIMenuItem>
    }
</FluentNavMenu>

@code {
    [Parameter, NotNull] public IRouterStore? Router { get; set; }
    [Parameter] public bool Horizontal { get; set; }
    [Parameter, NotNull] public IAppStore? App { get; set; }

    bool Collapsed => Horizontal ? false : App.Collapsed;
}
